<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./PrincipalTemplate.xhtml">

            <ui:define name="top">
                top
            </ui:define>

            <ui:define name="left">
                <p:commandLink value="Back to Principal Menu" action="PrincipalMenu"/>
            </ui:define>

            <ui:define name="content">
                <h1>Sales List</h1><br/>
                <f:view>
                    <h:form>
                        <p:commandButton value="Register Sale" action="CreateSale"/>
                        <h1><h:outputText value="List"/></h1>
                        <p:dataTable value="#{salesBean.listSales}" var="item">
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Idsale"/>
                                </f:facet>
                                <h:outputText value="#{item.idsale}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Folio"/>
                                </f:facet>
                                <h:outputText value="#{item.folio}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Total"/>
                                </f:facet>
                                <h:outputText value="#{item.total}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="IdsaleDetail"/>
                                </f:facet>
                                <h:outputText value="#{item.idsaleDetail}"/>
                            </p:column>
                        </p:dataTable>
                    </h:form>
                </f:view>

            </ui:define>

        </ui:composition>

    </body>
</html>
